# 输出长方形
for i in range(3):
    for j in range(3):
        print("*",end="")
    print()
print("-"*20)
# 输出直角三角形
for i in range(1, 6):
    for j in range(i):
        print("*", end="")
    print()
print("-"*20)
# 输出倒立的直角三角形
for i in range(1, 6)[::-1]:
    for j in range(i):
        print("*", end="")
    print()
print("-" * 20)
for i in range(0, 5):
    for j in range(1,10):
        if j < (5 - i) or j > (5 + i):
            print(" ", end="")
        else:
            print("*", end="")
    print()
print("-" * 20)
myList = [0,1,2,3,4,3,2,1,0]
for i in myList:
    for j in range(1,10):
        if j < (5 - i) or j > (5 + i):
            print(" ",end="")
        else:
            print("*",end="")
    print()
print("-" * 20)
